Carbon


KCSetAttribute

Header: Keychain.h Carbon status: Under Evaluation

Sets or modifies attribute data for a keychain item.

OSStatus KCSetAttribute (
    KCItemRef item, 
    KCAttribute *attr
);
item

A reference to the keychain item whose attribute data you wish to modify.

attr

A pointer to a structure containing the keychain item attribute data you wish to modify. The structure should contain a tag identifying the attribute you wish to modify, the length of the attribute data you wish to add, and a pointer to that data.

function result

A result code. The result code errKCInvalidItemRef indicates that the specified keychain item reference was invalid. The result code errKCNoSuchAttr indicates that you tried to set an attribute which is undefined for this item class. The result code errKCDataTooLarge indicates that more data was supplied than is allowed for this attribute type.

DISCUSSION

You can call the KCSetAttribute function to set or modify attribute data for a keychain item. Standard item attributes which can be modified include attributes defined by the constants kDescriptionKCItemAttr, kCommentKCItemAttr, kLabelKCItemAttr, kCreatorKCItemAttr, kTypeKCItemAttr, and kCustomIconKCItemAttr. See “Keychain Item Attribute Tag Constants” for a description of the attributes these constants define. Each class of item has additional attributes specific to that class which may be modified. For a complete list, see “Keychain Item Attribute Tag Constants”.

VERSION NOTES

Available beginning with Keychain Manager 1.0.

AVAILABILITY

Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)